<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="cms" uri="http://cms.gxsoft.com/tags-cms"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用人单位信息管理</title>
<link href="<%=request.getContextPath()%>/css/reset.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<table width="100%" border="1">
<c:if test="${!empty list && param.areaCode != ''}">
 <tr>
    <td class="nohover" colspan="10">
    <input class="buttondownload" type="button" value="下载" onclick="window.location.href='<%=request.getContextPath()%>/ViewContract.do?method=xls&areaCode=${param.areaCode}'">
    <input class="buttonzhutu" type="button" value="柱图" onclick="window.location.href='<%=request.getContextPath()%>/ViewContract.do?method=pic&areaCode=${param.areaCode}'">
    <input class="buttonbingtu" type="button" value="饼图" onclick="window.location.href='<%=request.getContextPath()%>/ViewContract.do?method=piePic&areaCode=${param.areaCode}'">
    </td>
 </tr>
 <tr>
    <td class="nohover" colspan="10" align="center">
    <b>甘肃省企业实行劳动合同制度情况统计表</b>
    </td>
 </tr>
  <tr>
    <td width="200">类别</td>
    <td width="80">企业总数</td>
    <td width="80">其中：实行劳动合同制企业数</td>
    <td width="80">实行劳动合同制企业占企业总数的％</td>
    <td width="80">职工总数</td>
    <td width="80">其中:招用劳动合同制职工人数</td>
    <td width="80">转到劳动合同制职工人数</td>
    <td width="80">实行劳动合同制职工占职工总数的％</td>
  </tr>
  <c:forEach items="${list}" var="prod" varStatus="lineInfo">
  <c:set var="unitTotalNum" scope="page" value="${unitTotalNum + prod.id.unitTotalNum}"/>
  <c:set var="unitTotalContractNum" scope="page" value="${unitTotalContractNum + prod.id.unitTotalContractNum}"/>
  <c:set var="workerTotalNum" scope="page" value="${workerTotalNum + prod.id.workerTotalNum}"/>
  <c:set var="workerTotalContractedNum" scope="page" value="${workerTotalContractedNum + prod.id.workerTotalContractedNum}"/>
  </c:forEach>
  <tr>
    <td>总计</td>
    <td>${unitTotalNum}</td>
    <td>${unitTotalContractNum}</td>
    <td><c:if test="${unitTotalNum != '0'}"><fmt:formatNumber value="${unitTotalContractNum/unitTotalNum*100}" pattern="#.0#"/></c:if></td>
    <td>${workerTotalNum}</td>
	<td>${workerTotalContractedNum}</td>
	<td></td>
	<td><c:if test="${workerTotalNum != '0'}"><fmt:formatNumber value="${workerTotalContractedNum/workerTotalNum*100}" pattern="#.0#"/></c:if></td>
  </tr>
  <c:forEach items="${list}" var="prod" varStatus="lineInfo">
  <tr <c:if test="${lineInfo.count % 2 == 0}">class="blue"</c:if>>
    <td>${prod.id.typeName}</td>
    <td>${prod.id.unitTotalNum}</td>
    <td>${prod.id.unitTotalContractNum}</td>
    <td><c:if test="${prod.id.unitTotalNum != '0'}"><fmt:formatNumber value="${prod.id.unitTotalContractNum/prod.id.unitTotalNum*100}" pattern="#.0#"/></c:if></td>
    <td>${prod.id.workerTotalNum}</td>
	<td>${prod.id.workerTotalContractedNum}</td>
	<td></td>
	<td><c:if test="${prod.id.workerTotalNum != '0'}"><fmt:formatNumber value="${prod.id.workerTotalContractedNum/prod.id.workerTotalNum*100}" pattern="#.0#"/></c:if></td>
  </tr>
  </c:forEach>
  
</c:if>
<c:if test="${empty list || param.areaCode == ''}">
 <tr>
    <td class="nohover" colspan="10" align="center">
    <b>请选择统计条件！</b>
    </td>
 </tr>
</c:if>
</table>
</body>
</html>
